import Vue from 'vue'
import Router from 'vue-router'
// import index from '@/components/index'
// import secrah from '@/components/secrah'
// import Mindex from '@/components/Mindex'
// import Msecrah from '@/components/Msecrah'
const index = () =>import('../components/index')
const secrah = () =>import('../components/secrah')
const Mindex = () =>import('../components/Mindex')
const Msecrah = () =>import('../components/Msecrah')
//1.通过Vue.use(插件)，安装插件
Vue.use(Router)

export default new Router({
  routes: [
    
    {
      path:'/',
      name:'default',
      redirect:'/index'//路由重定向
    },
    {
      path: '/index',
      name: 'index',
      component: index
    },
    {
      path: '/secrah',
      name: 'secrah',
      component: secrah
    },
    {
      path: '/Mindex',
      name: 'Mindex',
      component: Mindex
    },
    {
      path: '/Msecrah',
      name: 'Msecrah',
      component: Msecrah
    },
  ],
  mode:'history' 
})
